JBoss Community Archive (Read Only)

Teiid 8.3

Salesforce Data Sources

Salesforce data sources use a Teiid specific JCA connector "teiid-connector-salesforce.rar", which is deployed into the AS 7.x during installation. There are many ways to create the salesforce data source, using CLI,AdminShell, admin-console etc. The example shown below uses the CLI tool, as this works in both Standalone and Domain modes.

Execute following command using CLI once you connected to the Server. Make sure you provide the correct URL and user credentials. Add any additional properties required by the connector by duplicating the "connection-definitions" command below. Edit the JNDI name to match the JNDI name you used in VDB.

batch
/subsystem=resource-adapters/resource-adapter=sfDS:add(archive=teiid-connector-salesforce.rar, transaction-support=NoTransaction)
/subsystem=resource-adapters/resource-adapter=sfDS/connection-definitions=sfDS:add(jndi-name=java:/sfDS, class-name=org.teiid.resource.adapter.salesforce.SalesForceManagedConnectionFactory, enabled=true, use-java-context=true)
/subsystem=resource-adapters/resource-adapter=sfDS/connection-definitions=sfDS/config-properties=URL:add(value=https://www.salesforce.com/services/Soap/u/22.0)
/subsystem=resource-adapters/resource-adapter=sfDS/connection-definitions=sfDS/config-properties=username:add(value={user})
/subsystem=resource-adapters/resource-adapter=sfDS/connection-definitions=sfDS/config-properties=password:add(value={password})
/subsystem=resource-adapters/resource-adapter=sfDS/connection-definitions=sfDS:enable
runbatch

To find out all the properties that are supported by this Salesforce Connector execute the following command in the CLI.

/subsystem=teiid:read-rar-description(rar-name=teiid-connector-salesforce.rar)

 

As of AS 7.1 CR1b release the above does not work without restarting the Server. This issue will be fixed before 7.2 Final.

Developer's Tip

If the JBoss AS 7.x is running in standalone mode, you can also manually edit the "<jboss-install>/standalone/configuration/standalone-teiid.xml" file and add the XML configuration defined in "<jboss-install>/docs/teiid/datasources/salesforce" directory under "resource-adapters" subsystem. Shutdown the server before you edit this file, and restart after the modifications are done.

CXF Configuration

Salesforce service data source may choose a particular CXF config file and port configuration. The ConfigFile config property specifies the Spring XML configuration file for the CXF Bus and port configuration to be used by connections. If no config file is specified then the system default configuration will be used.

Only 1 port configuration can be used by this data source. The namespace URI for the QName in your config file should be "urn:partner.soap.sforce.com", with configuration name "Soap". For sample cxf configuration file and details on configuration see Web Service Data Sources

See the CXF documentation for all possible configuration options.

The CXF configuration in Salesforce data source is only used for http bus configuration not for purposes of ws-security, Salesforce has its own security authentication.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 12:37:23 UTC, last content change 2013-03-14 16:26:06 UTC.